package com.home.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.dao.FixDao;
import com.home.model.Fix;
import com.home.service.FixService;
@Service("fixService")
public class FixServiceImpl implements FixService{

	@Autowired
	private FixDao<Fix,Integer> fixDao;
	
	
	public void delete(Fix fix) {
		this.getFixDao().delete(fix.getId());
	}

	public List<Fix> getList() {
		// TODO Auto-generated method stub
		return this.getFixDao().getAll();
	}

	public void save(Fix fix) {
		this.getFixDao().save(fix);
	}

	public FixDao<Fix, Integer> getFixDao() {
		return fixDao;
	}

	public void setFixDao(FixDao<Fix, Integer> fixDao) {
		this.fixDao = fixDao;
	}

	public Fix getFix(Integer id) {
		return this.getFixDao().get(id);
	}

}
